﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spanner;

namespace SpannerWebSite
{
    internal abstract class MiniWebApp : UI
    {
        internal string Name;
        internal string PageTitle;
        internal Html Content = "";
        internal Act InitAct = null;
        internal Model[] Dependencies;
        internal Action Init;

        internal void WriteWebPage()
        {
            var path = Const.DemoWebSitePath;
            var html = StandardSpannerHtmlPage(PageTitle, Content);
            var webPage = WebPage(Name, html, InitAct, Dependencies);
            var ctxt = new Context(path);
            ctxt.WriteWebPage(webPage);
        }
    }
}
